package com.longqin.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 项目计划表
 * </p>
 *
 * @author longqin
 * @since 2025-03-31
 */
@Getter
@Setter
@TableName("bus_project_plan")
@ApiModel(value = "BusProjectPlan对象", description = "项目计划表")
public class BusProjectPlan implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("项目id")
    @TableField("project_id")
    private Integer projectId;

    @ApiModelProperty("任务名称")
    @TableField("task_name")
    private String taskName;

    @ApiModelProperty("上级任务")
    @TableField("parent_id")
    private Integer parentId;

    @ApiModelProperty("责任人")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("交付物")
    @TableField("attachments")
    private String attachments;

    @ApiModelProperty("备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty("状态：1-未开始，2-进行中，3-发布，0-删除")
    @TableField("status")
    private Integer status;
    
    @ApiModelProperty("任务排序")
    @TableField("group_seq")
    private Integer groupSeq;
    
    @ApiModelProperty("计划开始时间")
    @TableField("begin_date")
    private LocalDate beginDate;
    
    @ApiModelProperty("计划结束时间")
    @TableField("end_date")
    private LocalDate endDate;
    
    @ApiModelProperty("实际结束时间")
    @TableField("real_end_date")
    private LocalDate realEndDate;
    
    @ApiModelProperty("完成率")
    @TableField("completion_rate")
    private Integer completionRate;
    
    @ApiModelProperty("延期原因")
    @TableField("delay_reason")
    private String delayReason;
    
    @ApiModelProperty("责任人昵称")
    @TableField(exist = false)
    private String nickName;
    
    @ApiModelProperty("子任务")
    @TableField(exist = false)
    private List<BusProjectPlan> children;


}
